<?php
if(isset($_GET['user'])){
    $user=$_GET['user'];
    $user=  mysql_real_escape_string($user);
    $user=  user_read($user);
    if(!$user) exit("Ο χρήστης δεν βρέθηκε");
    ?>
<table>
    <tr>
        <td>Όνομα</td>
        <td><?php echo $user->firstName ?></td>
    </tr>
    <tr>
        <td>Επίθετο</td>
        <td><?php echo $user->lastName ?></td>
    </tr>
    <tr>
        <td>email</td>
        <td><?php echo $user->email ?></td>
    </tr>
    <tr>
        <td>Χώρα</td>
        <td><?php echo $user->country ?></td>
    </tr>
    <tr>
        <td>Διεύθυνση</td>
        <td><?php echo $user->streetAddress ?></td>
    </tr>
    <tr>
        <td>ΤΚ</td>
        <td><?php echo $user->postalCode ?></td>
    </tr>
    <tr>
        <td>Τηλέφωνο</td>
        <td><?php echo $user->phoneNumber ?></td>
    </tr>
    <tr>
        <td>Buyer Rating</td>
        <td><?php echo $user->buyerRating ?></td>
    </tr>
    <tr>
        <td>Seller Rating</td>
        <td><?php echo $user->sellerRating ?></td>
    </tr>
</table>
<a href="index.php?action=productlist&user=<?php echo $user->username ?>">Προϊόντα απο αυτόν τον χρήστη</a>
    <?php
}
?>
